import { createApp } from 'vue';
import App from './App.vue';
const app = createApp(App);
// 全局样式信息
import '@/assets/theme/default/main.css';
// 路由
import router from '@/router';
//store
import { setupStore } from '@/store';
// 引入第三方依赖
import ElckerLibsInter from '~/libs/ElckerLibs';
// 为啥引入？ https://blog.csdn.net/weixin_40716786/article/details/90045802
import 'default-passive-events';

const EAdminInit = async (): Promise<void> => {
  setupStore(app);
  app.use(router);
  ElckerLibsInter(app);
  // Mount when the route is ready
  // https://next.router.vuejs.org/api/#isready
  await router.isReady();
  app.mount('#app', true);
};

void EAdminInit();
